const http=require('http')
const fs=require('fs')
const path=require('path')
const qs=require('querystring')
const express=require('express')
const app=new express()
app.get('/users',(req,res)=>{
    res.sendFile(path.join(__dirname,'./views/users.html'))
})
app.post('/index',(req,res,next)=>{
    let str=""
    req.on("data",chunk=>{
        str+=chunk
    })
    req.on("end",()=>{
        req.body=qs.parse(str)
        next()
    })

    res.sendFile(path.join(__dirname,'./views/index.html'))
})
app.listen(9090)